<!--
 * @Author: 谢陈洁
 * @Date: 2024-11-15 21:15:12
 * @LastEditors: 谢陈洁
 * @LastEditTime: 2024-11-19 10:59:57
 * @Description: file content
-->
<template>
  <div class="houselist">
    <div class="title">热门精选</div>
    <div class="list">
      <template v-for="item in houselist" :key="item.data.houseId">
        <div class="houseitem">
          <houseItemType3 v-if="item.discoveryContentType === 3" :itemData="item.data" />
          <houseItemType9 v-else-if="item.discoveryContentType === 9" :itemData="item.data" />
        </div>
      </template>
    </div>
  </div>
</template>
<script setup>
import useHomeStore from '@/stores/modules/home';
import { storeToRefs } from 'pinia';

import houseItemType3 from '@/components/house-item-type3'
import houseItemType9 from '@/components/house-item-type9'

const homeStore = useHomeStore();
const { houselist } = storeToRefs(homeStore);
</script>
<style lang="less" scoped>
.houselist {
  padding: 10px;
}

.title {
  font-size: 20px;
  font-weight: 700;
  padding: 10px;
}

.list {
  display: flex;
  flex-wrap: wrap;

  .houseitem {
    flex-shrink: 0;
    width: 50%;
    box-sizing: border-box;
    padding: 4px;

  }
}
</style>
